import pandas as pd
import numpy as np
import os
from itertools import takewhile, dropwhile
from collections import Counter
import plotly.express as px
import plotly.graph_objects as go
from plotly.subplots import make_subplots
import dataframes_util as ut
if (not os.path.isfile('../tweets.csv')):
%run userPreparation.ipynb
dfPosts = pd.read_csv('../tweets.csv',low_memory=False)
dfPosts
| id | id_str | created_at | user_id | user_screen_name | user_verified | user_created_at | text | source | coordinates | ... | user_tweets_count | user_friends_count | user_followers_count | user_code_error | rt_user_code_error | in_reply_to_user_code_error | is_self_rt | user_url_cred | rt_user_url_cred | in_reply_to_user_url_cred | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1311804409903484930 | 1311804409903484930 | Thu Oct 01 23:05:18 +0000 2020 | 1035959506700783618 | alessia_smile6 | False | Sat Sep 01 18:36:08 +0000 2018 | Altri tre giorni di blocco per aver citato un ... | <a href="http://twitter.com/download/android" ... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | NaN | NaN | NaN |
| 1 | 1311813787159130117 | 1311813787159130117 | Thu Oct 01 23:42:33 +0000 2020 | 113584953 | GiornaledPuglia | False | Fri Feb 12 09:11:24 +0000 2010 | Covid, vaccino AstraZeneca alla prova dell'Age... | <a href="https://dlvrit.com/" rel="nofollow">d... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | NaN | NaN | NaN |
| 2 | 1311805637303644161 | 1311805637303644161 | Thu Oct 01 23:10:10 +0000 2020 | 1279710942020984832 | TestPerTutti | False | Sun Jul 05 09:37:48 +0000 2020 | https://t.co/oQZpHUBKrt | <a href="http://twitter.com/download/android" ... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | 1.00 | 1.00 | NaN |
| 3 | 1311798617578049538 | 1311798617578049538 | Thu Oct 01 22:42:17 +0000 2020 | 1215779772762148865 | CapitanHarlok6 | False | Fri Jan 10 23:37:56 +0000 2020 | "Dobbiamo resistere con il coltello tra i dent... | <a href="http://twitter.com/download/iphone" r... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | 0.90 | NaN | NaN |
| 4 | 1311806869917388801 | 1311806869917388801 | Thu Oct 01 23:15:04 +0000 2020 | 2660808424 | soteros1 | False | Tue Jul 01 17:29:02 +0000 2014 | Se volevate sapere perché Burioni viene invita... | <a href="http://twitter.com/download/iphone" r... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | 0.62 | 0.77 | NaN |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 4053196 | 1394609996197937159 | 1394609996197937159 | Tue May 18 11:05:08 +0000 2021 | 464822421 | CiaoGrosso | False | Sun Jan 15 17:25:21 +0000 2012 | Il medico testimonial pro vaccino a @Ariacheti... | <a href="http://twitter.com/download/iphone" r... | NaN | ... | 102577.0 | 1060.0 | 1114.0 | NaN | NaN | NaN | False | 0.33 | 1.00 | NaN |
| 4053197 | 1394610015823147011 | 1394610015823147011 | Tue May 18 11:05:13 +0000 2021 | 497188910 | Rosskitty77 | False | Sun Feb 19 18:26:36 +0000 2012 | "...«Ha lividi e piastrine basse». E ha richie... | <a href="https://mobile.twitter.com" rel="nofo... | NaN | ... | 79297.0 | 772.0 | 893.0 | NaN | NaN | NaN | False | 0.58 | NaN | NaN |
| 4053198 | 1394609887641022464 | 1394609887641022464 | Tue May 18 11:04:42 +0000 2021 | 955571652468801536 | GuidoIafrate | False | Mon Jan 22 22:43:30 +0000 2018 | Vaccinazioni nei luoghi di lavoro, fondamental... | <a href="http://twitter.com/download/android" ... | NaN | ... | 655.0 | 226.0 | 55.0 | NaN | NaN | NaN | False | NaN | NaN | NaN |
| 4053199 | 1394609899963830275 | 1394609899963830275 | Tue May 18 11:04:45 +0000 2021 | 57358236 | lucabattanta | False | Thu Jul 16 15:14:03 +0000 2009 | A #lariachetira c’è un MEDICO DI BASE che ha a... | <a href="https://mobile.twitter.com" rel="nofo... | NaN | ... | 517677.0 | 13671.0 | 20847.0 | NaN | NaN | NaN | False | 0.81 | 0.89 | NaN |
| 4053200 | 1394609930540306433 | 1394609930540306433 | Tue May 18 11:04:52 +0000 2021 | 3131638209 | kyappy80 | False | Fri Apr 03 20:02:31 +0000 2015 | Battiato detestava lo scientismo. Meglio che n... | <a href="https://mobile.twitter.com" rel="nofo... | NaN | ... | 6016.0 | 138.0 | 68.0 | NaN | NaN | NaN | False | NaN | NaN | NaN |
4053201 rows × 56 columns
listHighCred = ['tagadala7', 'La7tv', 'Corriere', 'tg2rai', 'TgrRaiPuglia', 'Linkiesta', 'ilfoglio_it',
'fanpage', 'LaStampa', 'RaiNews', 'fattoquotidiano', 'TgrRaiVeneto', 'agorarai', 'TgrRaiSicilia',
'UnioneSarda', 'SkyTG24', 'repubblica', 'TgrRai', 'Agenzia_Ansa', 'Tg3web', 'TgrRaiToscana',
'Affaritaliani', 'TgrRaiTrentino', 'PiazzapulitaLA7', 'Adnkronos', 'agerpres', 'RepubblicaTv',
'TgrRaiFVG', 'ilpost', 'Open_gol', 'Radio1Rai', 'MediasetTgcom24', 'TgLa7', 'RaiStudio24',
'TgrRaiMolise', 'sole24ore', 'Ticinonline', 'ricpuglisi', 'SimoneCosimi', 'giusmo1', 'RobertoBurioni',
'rtl1025', 'messveneto', 'HuffPostItalia', 'Agenzia_Italia', 'ItaliaViva', 'iltirreno', 'Agenzia_Dire',
'stebellentani', 'eziomauro', 'QRepubblica', 'lucianocapone', 'robersperanza', 'vocedelpatriota',
'GiovaQuez', 'Cartabellotta', 'istsupsan', 'christianrocca', 'Zeta_Luiss', 'radioanchio', '24Mattino',
'sottoinchiesta', 'riotta']
#Account that have retweeted a suspect (follower)
userHighCred = listHighCred
dfRetweet = pd.DataFrame()
print ("Generation ",0, ": ",len(userHighCred))
for i in range(0, 1):
dfRetweet = ut.retweet_a_suspect(dfPosts,userHighCred)
userHighCred = userHighCred + list(dfRetweet[dfRetweet['rt_rate']>=10.0].index)
userHighCred = list(set(userHighCred))
print ("Generation ",i+1, ": ",len(userHighCred))
dfRetweet
Generation 0 : 63 Generation 1 : 10832
| total | suspect | rt_rate | |
|---|---|---|---|
| user_screen_name | |||
| 00000o0OOOO00 | 87 | 2.0 | 2.298851 |
| 00650301 | 35 | 0.0 | 0.000000 |
| 007Vincentxxx | 111 | 9.0 | 8.108108 |
| 009mattiaa | 13 | 8.0 | 61.538462 |
| 00MrFrost00 | 44 | 1.0 | 2.272727 |
| ... | ... | ... | ... |
| zucche_rosa | 21 | 0.0 | 0.000000 |
| zucchigio | 46 | 2.0 | 4.347826 |
| zuggy04 | 246 | 49.0 | 19.918699 |
| zxuz53 | 17 | 0.0 | 0.000000 |
| zziocane66 | 354 | 0.0 | 0.000000 |
29224 rows × 3 columns
fig = px.histogram(x=dfRetweet[dfRetweet['rt_rate']>0]["rt_rate"],
histnorm='percent',title="Retweet rate on follower (high credibility)")
fig.update_xaxes(title='retweet rate')
fig.show()
dfProvax = dfPosts[dfPosts.isin(userHighCred)['user_screen_name']].copy()
listSuspect = ['IacobellisT','Piero42395724', 'TommyBrain','xenonian1', 'Z3r0Rules','Pietro_Otto',
'MarySpes','manu_etoile','CarpaneseSilva1','il_brigante07','Sakurauchi_Hime','MinervaMcGrani1',
'marchesaangeli','lucabattanta',
'gael99','LPinicia','Mariang47614228','SoniaLaVera','valy_s','Samira1577','daniele19921','d_essere'
'anto_galli4','LuigiF97101292','EureosCriss','vaniacavi',
'markred17','RenzoCianchetti','12qbert','ManuQ24916888','bisagnino','thewaterflea',
'BarbaraRaval','noitre32','intuslegens','pbecchi','miia_2018','ladyonorato','cris_cersei','RadioSavana',
'lameduck1960','a_meluzzi','francescatotolo','Mr_Ozymandias','FmMosca','LaVeritaWeb','Bluefidel47',
'fdragoni','byoblu','MinutemanItaly','TarroGiulio','NicolaPorro','25O319','sabrina__sf','liliaragnar',
'FabioFranchi1','EliseiNicole']
Any user that is defined as a novax that retweets a user, the retweeted user will automatically be considered a novax
#Account that have retweeted a suspect (follower)
userNovax = listSuspect
dfRetweet = pd.DataFrame()
print ("Generation ",0, ": ",len(userNovax))
for i in range(0, 2):
dfRetweet = ut.retweet_a_suspect(dfPosts,userNovax)
userNovax = userNovax + list(dfRetweet[dfRetweet['rt_rate']>=20.0].index)
userNovax = list(set(userNovax))
print ("Generation ",i+1, ": ",len(userNovax))
dfRetweet
Generation 0 : 56 Generation 1 : 5730 Generation 2 : 8490
| total | suspect | rt_rate | |
|---|---|---|---|
| user_screen_name | |||
| 00000o0OOOO00 | 87 | 38.0 | 43.678161 |
| 00650301 | 35 | 1.0 | 2.857143 |
| 007Vincentxxx | 111 | 1.0 | 0.900901 |
| 009mattiaa | 13 | 0.0 | 0.000000 |
| 00MrFrost00 | 44 | 0.0 | 0.000000 |
| ... | ... | ... | ... |
| zucche_rosa | 21 | 2.0 | 9.523810 |
| zucchigio | 46 | 0.0 | 0.000000 |
| zuggy04 | 246 | 0.0 | 0.000000 |
| zxuz53 | 17 | 7.0 | 41.176471 |
| zziocane66 | 354 | 203.0 | 57.344633 |
29224 rows × 3 columns
fig = px.histogram(x=dfRetweet[dfRetweet['rt_rate']>0]["rt_rate"],
histnorm='percent',title="Retweet rate on follower (novax)")
fig.update_xaxes(title='retweet rate')
fig.show()
dfNovax = dfPosts[dfPosts.isin(userNovax)['user_screen_name']].copy()
dfNovax.drop_duplicates(['id'],inplace=True)
dfNovax
| id | id_str | created_at | user_id | user_screen_name | user_verified | user_created_at | text | source | coordinates | ... | user_tweets_count | user_friends_count | user_followers_count | user_code_error | rt_user_code_error | in_reply_to_user_code_error | is_self_rt | user_url_cred | rt_user_url_cred | in_reply_to_user_url_cred | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1311804409903484930 | 1311804409903484930 | Thu Oct 01 23:05:18 +0000 2020 | 1035959506700783618 | alessia_smile6 | False | Sat Sep 01 18:36:08 +0000 2018 | Altri tre giorni di blocco per aver citato un ... | <a href="http://twitter.com/download/android" ... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | NaN | NaN | NaN |
| 4 | 1311806869917388801 | 1311806869917388801 | Thu Oct 01 23:15:04 +0000 2020 | 2660808424 | soteros1 | False | Tue Jul 01 17:29:02 +0000 2014 | Se volevate sapere perché Burioni viene invita... | <a href="http://twitter.com/download/iphone" r... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | 0.62 | 0.77 | NaN |
| 6 | 1311808100773629953 | 1311808100773629953 | Thu Oct 01 23:19:58 +0000 2020 | 975616683611181057 | Fedoraquattroc2 | False | Mon Mar 19 06:15:18 +0000 2018 | @ValeMameli Serve una svolta rapida da questa ... | <a href="http://twitter.com/download/android" ... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | 0.37 | NaN | 0.95 |
| 8 | 1311807149379551238 | 1311807149379551238 | Thu Oct 01 23:16:11 +0000 2020 | 31553996 | F52 | False | Wed Apr 15 23:07:10 +0000 2009 | Altri tre giorni di blocco per aver citato un ... | <a href="http://twitter.com/download/android" ... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | NaN | NaN | NaN |
| 9 | 1311804362440794113 | 1311804362440794113 | Thu Oct 01 23:05:06 +0000 2020 | 1094614208107499520 | laura_pi79 | False | Sun Feb 10 15:08:58 +0000 2019 | Altri tre giorni di blocco per aver citato un ... | <a href="http://twitter.com/download/android" ... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | 0.50 | NaN | NaN |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 4053195 | 1394610031262306304 | 1394610031262306304 | Tue May 18 11:05:16 +0000 2021 | 4309630395 | Ileana0406 | False | Sat Nov 28 18:18:40 +0000 2015 | Vaccini, nuovo errore di somministrazione in T... | <a href="http://twitter.com/download/iphone" r... | NaN | ... | 21105.0 | 1130.0 | 833.0 | NaN | NaN | NaN | False | NaN | 1.00 | NaN |
| 4053196 | 1394609996197937159 | 1394609996197937159 | Tue May 18 11:05:08 +0000 2021 | 464822421 | CiaoGrosso | False | Sun Jan 15 17:25:21 +0000 2012 | Il medico testimonial pro vaccino a @Ariacheti... | <a href="http://twitter.com/download/iphone" r... | NaN | ... | 102577.0 | 1060.0 | 1114.0 | NaN | NaN | NaN | False | 0.33 | 1.00 | NaN |
| 4053197 | 1394610015823147011 | 1394610015823147011 | Tue May 18 11:05:13 +0000 2021 | 497188910 | Rosskitty77 | False | Sun Feb 19 18:26:36 +0000 2012 | "...«Ha lividi e piastrine basse». E ha richie... | <a href="https://mobile.twitter.com" rel="nofo... | NaN | ... | 79297.0 | 772.0 | 893.0 | NaN | NaN | NaN | False | 0.58 | NaN | NaN |
| 4053199 | 1394609899963830275 | 1394609899963830275 | Tue May 18 11:04:45 +0000 2021 | 57358236 | lucabattanta | False | Thu Jul 16 15:14:03 +0000 2009 | A #lariachetira c’è un MEDICO DI BASE che ha a... | <a href="https://mobile.twitter.com" rel="nofo... | NaN | ... | 517677.0 | 13671.0 | 20847.0 | NaN | NaN | NaN | False | 0.81 | 0.89 | NaN |
| 4053200 | 1394609930540306433 | 1394609930540306433 | Tue May 18 11:04:52 +0000 2021 | 3131638209 | kyappy80 | False | Fri Apr 03 20:02:31 +0000 2015 | Battiato detestava lo scientismo. Meglio che n... | <a href="https://mobile.twitter.com" rel="nofo... | NaN | ... | 6016.0 | 138.0 | 68.0 | NaN | NaN | NaN | False | NaN | NaN | NaN |
1361155 rows × 56 columns
dfProvax.drop_duplicates(['id'],inplace=True)
dfProvax
| id | id_str | created_at | user_id | user_screen_name | user_verified | user_created_at | text | source | coordinates | ... | user_tweets_count | user_friends_count | user_followers_count | user_code_error | rt_user_code_error | in_reply_to_user_code_error | is_self_rt | user_url_cred | rt_user_url_cred | in_reply_to_user_url_cred | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 | 1311805637303644161 | 1311805637303644161 | Thu Oct 01 23:10:10 +0000 2020 | 1279710942020984832 | TestPerTutti | False | Sun Jul 05 09:37:48 +0000 2020 | https://t.co/oQZpHUBKrt | <a href="http://twitter.com/download/android" ... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | 1.00 | 1.0 | NaN |
| 3 | 1311798617578049538 | 1311798617578049538 | Thu Oct 01 22:42:17 +0000 2020 | 1215779772762148865 | CapitanHarlok6 | False | Fri Jan 10 23:37:56 +0000 2020 | "Dobbiamo resistere con il coltello tra i dent... | <a href="http://twitter.com/download/iphone" r... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | 0.90 | NaN | NaN |
| 5 | 1311806204973404161 | 1311806204973404161 | Thu Oct 01 23:12:26 +0000 2020 | 607187088 | Pattyjune22 | False | Wed Jun 13 10:53:22 +0000 2012 | Il vaccino contro HPV è sicuro, efficace, grat... | <a href="http://twitter.com/download/android" ... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | NaN | NaN | NaN |
| 17 | 1311811303078494208 | 1311811303078494208 | Thu Oct 01 23:32:41 +0000 2020 | 1292021606 | FrancyP_ | False | Sat Mar 23 17:26:21 +0000 2013 | Tamponi e vaccini antinfluenzali devono essere... | <a href="http://twitter.com/download/android" ... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | NaN | NaN | NaN |
| 28 | 1311802014217707522 | 1311802014217707522 | Thu Oct 01 22:55:46 +0000 2020 | 1010279700210561025 | lantifragile | False | Fri Jun 22 21:53:45 +0000 2018 | Il vaccino contro HPV è sicuro, efficace, grat... | <a href="http://twitter.com/download/android" ... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | NaN | NaN | NaN |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 4053174 | 1394609630542811138 | 1394609630542811138 | Tue May 18 11:03:41 +0000 2021 | 1402708182 | BansCollector | False | Sat May 04 16:15:39 +0000 2013 | @stebaraz Quando hai voglia e tempo, che ne pe... | <a href="https://mobile.twitter.com" rel="nofo... | NaN | ... | 51214.0 | 1532.0 | 1087.0 | NaN | NaN | NaN | False | NaN | NaN | 1.0 |
| 4053187 | 1394609981580840961 | 1394609981580840961 | Tue May 18 11:05:04 +0000 2021 | 804354408 | TgrRai | True | Wed Sep 05 10:56:01 +0000 2012 | #vaccino Da oggi possono aderire alla #Campagn... | <a href="https://mobile.twitter.com" rel="nofo... | NaN | ... | 251546.0 | 370.0 | 63681.0 | NaN | NaN | NaN | False | 1.00 | 1.0 | NaN |
| 4053190 | 1394609810470055936 | 1394609810470055936 | Tue May 18 11:04:24 +0000 2021 | 2820333045 | OvileItalia | False | Thu Oct 09 19:45:14 +0000 2014 | NON C’È VACCINO\n\n#ilmanifesto #laprima del 1... | <a href="http://twitter.com/download/android" ... | NaN | ... | 21508.0 | 231.0 | 190.0 | NaN | NaN | NaN | False | 0.83 | NaN | NaN |
| 4053191 | 1394609946881298432 | 1394609946881298432 | Tue May 18 11:04:56 +0000 2021 | 2926782875 | Mustapha1508 | False | Wed Dec 17 10:59:26 +0000 2014 | Vaccino, dopo il caso della 23enne un altro er... | <a href="http://twitter.com/download/iphone" r... | NaN | ... | 50672.0 | 5003.0 | 3923.0 | NaN | NaN | NaN | False | NaN | 1.0 | NaN |
| 4053195 | 1394610031262306304 | 1394610031262306304 | Tue May 18 11:05:16 +0000 2021 | 4309630395 | Ileana0406 | False | Sat Nov 28 18:18:40 +0000 2015 | Vaccini, nuovo errore di somministrazione in T... | <a href="http://twitter.com/download/iphone" r... | NaN | ... | 21105.0 | 1130.0 | 833.0 | NaN | NaN | NaN | False | NaN | 1.0 | NaN |
872211 rows × 56 columns
idNovax = dfNovax.groupby('id').first().index
dfOtherElem = dfPosts[dfPosts['id'].isin(idNovax) == False]
idProvax = dfProvax.groupby('id').first().index
dfOtherElem = dfOtherElem[dfOtherElem['id'].isin(idProvax) == False]
dfOtherElem
| id | id_str | created_at | user_id | user_screen_name | user_verified | user_created_at | text | source | coordinates | ... | user_tweets_count | user_friends_count | user_followers_count | user_code_error | rt_user_code_error | in_reply_to_user_code_error | is_self_rt | user_url_cred | rt_user_url_cred | in_reply_to_user_url_cred | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1311813787159130117 | 1311813787159130117 | Thu Oct 01 23:42:33 +0000 2020 | 113584953 | GiornaledPuglia | False | Fri Feb 12 09:11:24 +0000 2010 | Covid, vaccino AstraZeneca alla prova dell'Age... | <a href="https://dlvrit.com/" rel="nofollow">d... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | NaN | NaN | NaN |
| 7 | 1311799458187956228 | 1311799458187956228 | Thu Oct 01 22:45:37 +0000 2020 | 829427701 | Pietroclo_ | False | Mon Sep 17 16:57:52 +0000 2012 | @mike_fusco Forse la maglia del Napoli è il va... | <a href="http://twitter.com/download/android" ... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | NaN | NaN | NaN |
| 14 | 1311811293943300096 | 1311811293943300096 | Thu Oct 01 23:32:39 +0000 2020 | 1118432292131753984 | Notiziedi_it | False | Wed Apr 17 08:33:32 +0000 2019 | Sanità Roma, l’allarme della farmacista: non a... | <a href="http://publicize.wp.com/" rel="nofoll... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | 1.0 | NaN | NaN |
| 15 | 1311813516123398148 | 1311813516123398148 | Thu Oct 01 23:41:29 +0000 2020 | 72016096 | salutedomani | False | Sun Sep 06 11:19:53 +0000 2009 | #CORONAVIRUS. #ASTRAZENECA, PARTITA VALUTAZION... | <a href="https://www.google.com/" rel="nofollo... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | NaN | NaN | NaN |
| 16 | 1311813514479140865 | 1311813514479140865 | Thu Oct 01 23:41:28 +0000 2020 | 72016096 | salutedomani | False | Sun Sep 06 11:19:53 +0000 2009 | #CORONAVIRUS. #SANOFI, AL LAVORO SU #VACCINO U... | <a href="https://www.google.com/" rel="nofollo... | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | False | NaN | NaN | NaN |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 4053184 | 1394609950278754304 | 1394609950278754304 | Tue May 18 11:04:57 +0000 2021 | 1339116563950170118 | RagDiabolik | False | Wed Dec 16 07:54:15 +0000 2020 | @Cartabellotta Rifiutare il vaccino E' UN LEGI... | <a href="https://mobile.twitter.com" rel="nofo... | NaN | ... | 1440.0 | 37.0 | 44.0 | NaN | NaN | NaN | False | NaN | NaN | 0.97 |
| 4053188 | 1394609936173252610 | 1394609936173252610 | Tue May 18 11:04:54 +0000 2021 | 767675142 | EbenYaakov | False | Sun Aug 19 14:44:25 +0000 2012 | @BFMTV @olivierveran Mon corps mon choix , nou... | <a href="https://mobile.twitter.com" rel="nofo... | NaN | ... | 140023.0 | 1585.0 | 1296.0 | NaN | NaN | NaN | False | NaN | NaN | NaN |
| 4053189 | 1394609850089345025 | 1394609850089345025 | Tue May 18 11:04:33 +0000 2021 | 71210454 | tuttoggi | False | Thu Sep 03 09:01:38 +0000 2009 | Anche i carabinieri del Nas potrebbero interes... | <a href="https://www.postpickr.com" rel="nofol... | NaN | ... | 93104.0 | 228.0 | 3744.0 | NaN | NaN | NaN | False | NaN | NaN | NaN |
| 4053193 | 1394609894700064771 | 1394609894700064771 | Tue May 18 11:04:44 +0000 2021 | 171756510 | neghittoso | False | Wed Jul 28 02:48:49 +0000 2010 | @AndreaBeltrameJ @prokofiev91 @gred_vet @carlo... | <a href="https://mobile.twitter.com" rel="nofo... | NaN | ... | 11676.0 | 527.0 | 280.0 | NaN | NaN | NaN | False | NaN | NaN | NaN |
| 4053198 | 1394609887641022464 | 1394609887641022464 | Tue May 18 11:04:42 +0000 2021 | 955571652468801536 | GuidoIafrate | False | Mon Jan 22 22:43:30 +0000 2018 | Vaccinazioni nei luoghi di lavoro, fondamental... | <a href="http://twitter.com/download/android" ... | NaN | ... | 655.0 | 226.0 | 55.0 | NaN | NaN | NaN | False | NaN | NaN | NaN |
1851775 rows × 56 columns
dfProvax.to_csv('retweet_class/tweets_provax.csv', index=False)
dfNovax.to_csv('retweet_class/tweets_novax.csv', index=False)
dfOtherElem.to_csv('retweet_class/tweets_otherUser.csv', index=False)
#Extract to another dataframe info about doubled classified users
doubled_class = list(np.array(dfNovax['user_id'])[pd.Series(dfNovax['user_id']).isin(dfProvax['user_id'])])
dfDoubled = dfPosts[dfPosts['user_id'].isin(doubled_class)]
dfDoubled.to_csv('retweet_class/tweets_doubled_classified.csv', index=False)